Skip to content

Conversation

@rjcamatos
Copy link

If there are 2 or more methods with the same name but reciving diferent arguments the QJSEngine Pickup the First One declared.

Example:
methodxyz(string)
methodxyz(objptr*)

It picks up the first one passing as argument a string and not the one that i was expecting an object as it was send.

qtprojectorg pushed a commit that referenced this pull request Dec 8, 2023
Using std::binary_search has the requirement that the passed
range fulfils ordering requirements, which was not the case
for the cppKeywords array here.

As the QString doc says [1]:

> QStrings can be compared using overloaded operators such as operator<(),
> operator<=(), operator==(), operator>=(), and so on. Note that
> the comparison is based exclusively on the numeric Unicode
> values of the characters. It is very fast, but is not what a
> human would expect; (...)

Therefore, sort the array accordingly and add an assert to
ensure it will remain sorted.

Fixes an crash/assert when building qtdeclarative with
CXXFLAGS='-D_GLIBCXX_DEBUG':

    /usr/include/c++/13/bits/stl_algo.h:2243:
    In function:
        bool std::binary_search(_FIter, _FIter, const _Tp&) [with _FIter = const
        QString*; _Tp = QStringView]

    Error: elements in iterator range [first, last) are not partitioned by the
    value __val.

    Objects involved in the operation:
        iterator "first" @ 0x7ffc4a2c4f18 {
          type = QString const* (constant iterator);
        }
        iterator "last" @ 0x7ffc4a2c4f10 {
          type = QString const* (constant iterator);
        }
    Aborted (core dumped)
    ninja: build stopped: subcommand failed.

GDB backtrace:

    Program terminated with signal SIGABRT, Aborted.
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    44      ./nptl/pthread_kill.c: No such file or directory.
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f307e0a815f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
    #2  0x00007f307e05a472 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f307e0444b2 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f307e2a300d in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00005639ff90471d in std::binary_search<QString const*, QStringView> (__first=0x5639ffa1a9c0 <QmltcVisitor::checkForNamingCollisionsWithCpp(QDeferredSharedPointer<QQmlJSScope const> const&)::cppKeywords>,
        __last=0x5639ffa1b2c0 <guard variable for QmltcVisitor::checkForNamingCollisionsWithCpp(QDeferredSharedPointer<QQmlJSScope const> const&)::cppKeywords>, __val=...) at /usr/include/c++/13/bits/stl_algo.h:2243
    #6  0x00005639ff8fb837 in operator() (__closure=0x7ffc4a2c52bf, word=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:764
    #7  0x00005639ff8fb89e in operator() (__closure=0x7ffc4a2c52a0, name=..., errorPrefix=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:768
    #8  0x00005639ff8fc99b in QmltcVisitor::checkForNamingCollisionsWithCpp (this=0x7ffc4a2c6070, type=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:787
    #9  0x00005639ff8f9dea in QmltcVisitor::endVisit (this=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:341
    #10 0x00007f307f6636fa in QQmlJS::AST::UiProgram::accept0 (this=0x563a002e0628, visitor=0x7ffc4a2c6070) at /home/michi/development/git/qt5/qtdeclarative/src/qml/parser/qqmljsast.cpp:1193
    #11 0x00007f3080159b8f in QQmlJS::AST::Node::accept (this=0x563a002e0628, visitor=0x7ffc4a2c6070)
        at /home/michi/development/git/qt5/qtbase/include/QtQml/6.7.0/QtQml/private/../../../../../../qtdeclarative/src/qml/parser/qqmljsast_p.h:272
    #12 0x00007f3080212f4b in QQmlJSTypeResolver::init (this=0x7ffc4a2c5b50, visitor=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:173
    #13 0x00005639ff8f0bd3 in QmltcTypeResolver::init (this=0x7ffc4a2c5b50, visitor=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltctyperesolver.cpp:19
    #14 0x00005639ff8c02d4 in main (argc=23, argv=0x7ffc4a2c7a68) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/main.cpp:269

[1] https://doc.qt.io/qt-6/qstring.html#comparing-strings

Change-Id: I82ebbcdca4ab90155b935f9af24b3a3821134563
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
@cla-assistant
Copy link

cla-assistant bot commented Nov 15, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 18 committers have signed the CLA.

✅ EvenOAndersen
❌ Oliver Eftevaag
❌ timblechmann
❌ kapinter
❌ samishalayel
❌ iCristalrope
❌ ec1oud
❌ mitchcurtis
❌ alcazaco
❌ eskilblomfeldt
❌ aavit
❌ ASpoerl
❌ SmallLars
❌ semlanik
❌ JKSH
❌ nezticle
❌ Issam-b
❌ ulfhermannqt


Oliver Eftevaag seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

qtprojectorg pushed a commit that referenced this pull request Sep 9, 2025
Use dimmer as a context object rather than the test itself, which
outlives it.

The backtrace was:

    FAIL!  : tst_QQuickPopup::Basic::fadeDimmer(modal) The computed value is expected to be greater than the baseline, but is not
       Computed (opacityChangeCount): 2
       Baseline (2)                 : 2
       Loc: [/Users/mitch/dev/qt-dev2/qtdeclarative/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp(2629)]
    =================================================================
    ==68826==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016b7f7140 at pc 0x000104743c68 bp 0x00016b7ecfd0 sp 0x00016b7ecfc8
    READ of size 4 at 0x00016b7f7140 thread T0
        #0 0x000104743c64 in tst_QQuickPopup::fadeDimmer()::$_0::operator()() const tst_qquickpopup.cpp:2625
        #1 0x000104743bc0 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()::operator()() const qobjectdefs_impl.h:116
        #2 0x000104743b64 in void QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()>(void**, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()&&) qobjectdefs_impl.h:65
        #3 0x000104743ab4 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**) qobjectdefs_impl.h:115
        #4 0x000104743930 in void QtPrivate::FunctorCallable<tst_QQuickPopup::fadeDimmer()::$_0>::call<QtPrivate::List<>, void>(tst_QQuickPopup::fadeDimmer()::$_0&, void*, void**) qobjectdefs_impl.h:337
        #5 0x000104743848 in QtPrivate::QCallableObject<tst_QQuickPopup::fadeDimmer()::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:547
        #6 0x00011694273c in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:461
        #7 0x000116e49454 in void doActivate<false>(QObject*, int, void**) qobject.cpp:4284
        #8 0x000116e467a0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4344
        #9 0x00010c1462d4 in QQuickItem::opacityChanged() moc_qquickitem.cpp:1019
        #10 0x00010c1461c8 in QQuickItem::setOpacity(double) qquickitem.cpp:6517
        #11 0x00010c168638 in QQuickItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) moc_qquickitem.cpp:850
        #12 0x000113847100 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:413
        #13 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #14 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #15 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #16 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #17 0x00010c9949ac in QQuickAnimationPropertyUpdater::setValue(double) qquickanimation.cpp:2740
        #18 0x00010c992444 in QQuickBulkValueAnimator::updateCurrentTime(int) qquickanimation.cpp:2069
        #19 0x000114345428 in QAbstractAnimationJob::setCurrentTime(int) qabstractanimationjob.cpp:481
        #20 0x000114349c3c in QAbstractAnimationJob::setState(QAbstractAnimationJob::State) qabstractanimationjob.cpp:367
        #21 0x00011434bc34 in QAbstractAnimationJob::start() qabstractanimationjob.cpp:514
        #22 0x00010c9ff568 in QQuickBehavior::write(QVariant const&) qquickbehavior.cpp:419
        #23 0x00010c9ff88c in non-virtual thunk to QQuickBehavior::write(QVariant const&) qquickbehavior.cpp
        #24 0x000113f53b7c in QQmlInterceptorMetaObject::doIntercept(QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:392
        #25 0x000113f532e4 in QQmlInterceptorMetaObject::intercept(QMetaObject::Call, int, void**) qqmlvmemetaobject_p.h:153
        #26 0x000113f59788 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:750
        #27 0x0001138474d0 in void QQmlPropertyData::doMetacall<(QMetaObject::Call)2>(QObject*, int, void**) const qqmlpropertydata_p.h:395
        #28 0x000113847128 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:415
        #29 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #30 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #31 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #32 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #33 0x000113c38f84 in QQmlProperty::write(QVariant const&) const qqmlproperty.cpp:1863
        #34 0x000113c39358 in QQmlProperty::write(QObject*, QString const&, QVariant const&) qqmlproperty.cpp:1880
        #35 0x000107c1db04 in QQuickPopupPrivate::hideDimmer() qquickpopup.cpp:1290
        #36 0x000107c16a68 in QQuickPopupPrivate::prepareExitTransition() qquickpopup.cpp:821
        #37 0x000107c1e038 in QQuickPopupTransitionManager::transitionExit() qquickpopup.cpp:1326
        #38 0x000107c23fd4 in QQuickPopup::setVisible(bool) qquickpopup.cpp:2496
        #39 0x000107c104d8 in QQuickPopup::close() qquickpopup.cpp:1408
        #40 0x000107c1ba80 in QQuickPopup::setParentItem(QQuickItem*) qquickpopup.cpp:2180
        #41 0x000107c1b324 in QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp:1063
        #42 0x000107c1bb8c in non-virtual thunk to QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp
        #43 0x00010c117f70 in void QQuickItemPrivate::notifyChangeListeners<void (QQuickItemChangeListener::*)(QQuickItem*), QQuickItem*>(QFlags<QQuickItemPrivate::ChangeType>, void (QQuickItemChangeListener::*&&)(QQuickItem*), QQuickItem*&&) qquickitem_p.h:413
        #44 0x00010c113d7c in QQuickItem::~QQuickItem() qquickitem.cpp:2420
        #45 0x00010c50e3e8 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #46 0x00010c4ed840 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #47 0x00010c4ed86c in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #48 0x00010c4da1c0 in QQuickWindow::~QQuickWindow() qquickwindow.cpp:1197
        #49 0x00010c531f34 in QQuickWindowQmlImpl::~QQuickWindowQmlImpl() qquickwindowmodule.cpp:73
        #50 0x00010cf2d4f4 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:104
        #51 0x00010cf2d3e0 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #52 0x00010cf2d40c in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #53 0x00010472efa8 in QScopedPointerDeleter<QObject>::cleanup(QObject*) qscopedpointer.h:24
        #54 0x00010472eefc in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:81
        #55 0x00010466f0e8 in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:79
        #56 0x00010471246c in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #57 0x00010468ff88 in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #58 0x0001046a953c in tst_QQuickPopup::fadeDimmer() tst_qquickpopup.cpp:2635
        [...]

Amends ef8bde8.

Pick-to: 6.8 6.9 6.10
Change-Id: Ie5c49b7d9ecd3c74f822590d296062b516563391
Reviewed-by: Volker Hilsheimer <[email protected]>
qtprojectorg pushed a commit that referenced this pull request Sep 12, 2025
Use dimmer as a context object rather than the test itself, which
outlives it.

The backtrace was:

    FAIL!  : tst_QQuickPopup::Basic::fadeDimmer(modal) The computed value is expected to be greater than the baseline, but is not
       Computed (opacityChangeCount): 2
       Baseline (2)                 : 2
       Loc: [/Users/mitch/dev/qt-dev2/qtdeclarative/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp(2629)]
    =================================================================
    ==68826==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016b7f7140 at pc 0x000104743c68 bp 0x00016b7ecfd0 sp 0x00016b7ecfc8
    READ of size 4 at 0x00016b7f7140 thread T0
        #0 0x000104743c64 in tst_QQuickPopup::fadeDimmer()::$_0::operator()() const tst_qquickpopup.cpp:2625
        #1 0x000104743bc0 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()::operator()() const qobjectdefs_impl.h:116
        #2 0x000104743b64 in void QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()>(void**, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()&&) qobjectdefs_impl.h:65
        #3 0x000104743ab4 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**) qobjectdefs_impl.h:115
        #4 0x000104743930 in void QtPrivate::FunctorCallable<tst_QQuickPopup::fadeDimmer()::$_0>::call<QtPrivate::List<>, void>(tst_QQuickPopup::fadeDimmer()::$_0&, void*, void**) qobjectdefs_impl.h:337
        #5 0x000104743848 in QtPrivate::QCallableObject<tst_QQuickPopup::fadeDimmer()::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:547
        #6 0x00011694273c in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:461
        #7 0x000116e49454 in void doActivate<false>(QObject*, int, void**) qobject.cpp:4284
        #8 0x000116e467a0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4344
        #9 0x00010c1462d4 in QQuickItem::opacityChanged() moc_qquickitem.cpp:1019
        #10 0x00010c1461c8 in QQuickItem::setOpacity(double) qquickitem.cpp:6517
        #11 0x00010c168638 in QQuickItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) moc_qquickitem.cpp:850
        #12 0x000113847100 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:413
        #13 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #14 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #15 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #16 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #17 0x00010c9949ac in QQuickAnimationPropertyUpdater::setValue(double) qquickanimation.cpp:2740
        #18 0x00010c992444 in QQuickBulkValueAnimator::updateCurrentTime(int) qquickanimation.cpp:2069
        #19 0x000114345428 in QAbstractAnimationJob::setCurrentTime(int) qabstractanimationjob.cpp:481
        #20 0x000114349c3c in QAbstractAnimationJob::setState(QAbstractAnimationJob::State) qabstractanimationjob.cpp:367
        #21 0x00011434bc34 in QAbstractAnimationJob::start() qabstractanimationjob.cpp:514
        #22 0x00010c9ff568 in QQuickBehavior::write(QVariant const&) qquickbehavior.cpp:419
        #23 0x00010c9ff88c in non-virtual thunk to QQuickBehavior::write(QVariant const&) qquickbehavior.cpp
        #24 0x000113f53b7c in QQmlInterceptorMetaObject::doIntercept(QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:392
        #25 0x000113f532e4 in QQmlInterceptorMetaObject::intercept(QMetaObject::Call, int, void**) qqmlvmemetaobject_p.h:153
        #26 0x000113f59788 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:750
        #27 0x0001138474d0 in void QQmlPropertyData::doMetacall<(QMetaObject::Call)2>(QObject*, int, void**) const qqmlpropertydata_p.h:395
        #28 0x000113847128 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:415
        #29 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #30 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #31 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #32 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #33 0x000113c38f84 in QQmlProperty::write(QVariant const&) const qqmlproperty.cpp:1863
        #34 0x000113c39358 in QQmlProperty::write(QObject*, QString const&, QVariant const&) qqmlproperty.cpp:1880
        #35 0x000107c1db04 in QQuickPopupPrivate::hideDimmer() qquickpopup.cpp:1290
        #36 0x000107c16a68 in QQuickPopupPrivate::prepareExitTransition() qquickpopup.cpp:821
        #37 0x000107c1e038 in QQuickPopupTransitionManager::transitionExit() qquickpopup.cpp:1326
        #38 0x000107c23fd4 in QQuickPopup::setVisible(bool) qquickpopup.cpp:2496
        #39 0x000107c104d8 in QQuickPopup::close() qquickpopup.cpp:1408
        #40 0x000107c1ba80 in QQuickPopup::setParentItem(QQuickItem*) qquickpopup.cpp:2180
        #41 0x000107c1b324 in QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp:1063
        #42 0x000107c1bb8c in non-virtual thunk to QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp
        #43 0x00010c117f70 in void QQuickItemPrivate::notifyChangeListeners<void (QQuickItemChangeListener::*)(QQuickItem*), QQuickItem*>(QFlags<QQuickItemPrivate::ChangeType>, void (QQuickItemChangeListener::*&&)(QQuickItem*), QQuickItem*&&) qquickitem_p.h:413
        #44 0x00010c113d7c in QQuickItem::~QQuickItem() qquickitem.cpp:2420
        #45 0x00010c50e3e8 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #46 0x00010c4ed840 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #47 0x00010c4ed86c in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #48 0x00010c4da1c0 in QQuickWindow::~QQuickWindow() qquickwindow.cpp:1197
        #49 0x00010c531f34 in QQuickWindowQmlImpl::~QQuickWindowQmlImpl() qquickwindowmodule.cpp:73
        #50 0x00010cf2d4f4 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:104
        #51 0x00010cf2d3e0 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #52 0x00010cf2d40c in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #53 0x00010472efa8 in QScopedPointerDeleter<QObject>::cleanup(QObject*) qscopedpointer.h:24
        #54 0x00010472eefc in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:81
        #55 0x00010466f0e8 in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:79
        #56 0x00010471246c in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #57 0x00010468ff88 in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #58 0x0001046a953c in tst_QQuickPopup::fadeDimmer() tst_qquickpopup.cpp:2635
        [...]

Amends ef8bde8.

Pick-to: 6.9 6.8
Change-Id: Ie5c49b7d9ecd3c74f822590d296062b516563391
Reviewed-by: Volker Hilsheimer <[email protected]>
(cherry picked from commit f8742ca)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
qtprojectorg pushed a commit that referenced this pull request Sep 12, 2025
Use dimmer as a context object rather than the test itself, which
outlives it.

The backtrace was:

    FAIL!  : tst_QQuickPopup::Basic::fadeDimmer(modal) The computed value is expected to be greater than the baseline, but is not
       Computed (opacityChangeCount): 2
       Baseline (2)                 : 2
       Loc: [/Users/mitch/dev/qt-dev2/qtdeclarative/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp(2629)]
    =================================================================
    ==68826==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016b7f7140 at pc 0x000104743c68 bp 0x00016b7ecfd0 sp 0x00016b7ecfc8
    READ of size 4 at 0x00016b7f7140 thread T0
        #0 0x000104743c64 in tst_QQuickPopup::fadeDimmer()::$_0::operator()() const tst_qquickpopup.cpp:2625
        #1 0x000104743bc0 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()::operator()() const qobjectdefs_impl.h:116
        #2 0x000104743b64 in void QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()>(void**, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()&&) qobjectdefs_impl.h:65
        #3 0x000104743ab4 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**) qobjectdefs_impl.h:115
        #4 0x000104743930 in void QtPrivate::FunctorCallable<tst_QQuickPopup::fadeDimmer()::$_0>::call<QtPrivate::List<>, void>(tst_QQuickPopup::fadeDimmer()::$_0&, void*, void**) qobjectdefs_impl.h:337
        #5 0x000104743848 in QtPrivate::QCallableObject<tst_QQuickPopup::fadeDimmer()::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:547
        #6 0x00011694273c in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:461
        #7 0x000116e49454 in void doActivate<false>(QObject*, int, void**) qobject.cpp:4284
        #8 0x000116e467a0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4344
        #9 0x00010c1462d4 in QQuickItem::opacityChanged() moc_qquickitem.cpp:1019
        #10 0x00010c1461c8 in QQuickItem::setOpacity(double) qquickitem.cpp:6517
        #11 0x00010c168638 in QQuickItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) moc_qquickitem.cpp:850
        #12 0x000113847100 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:413
        #13 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #14 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #15 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #16 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #17 0x00010c9949ac in QQuickAnimationPropertyUpdater::setValue(double) qquickanimation.cpp:2740
        #18 0x00010c992444 in QQuickBulkValueAnimator::updateCurrentTime(int) qquickanimation.cpp:2069
        #19 0x000114345428 in QAbstractAnimationJob::setCurrentTime(int) qabstractanimationjob.cpp:481
        #20 0x000114349c3c in QAbstractAnimationJob::setState(QAbstractAnimationJob::State) qabstractanimationjob.cpp:367
        #21 0x00011434bc34 in QAbstractAnimationJob::start() qabstractanimationjob.cpp:514
        #22 0x00010c9ff568 in QQuickBehavior::write(QVariant const&) qquickbehavior.cpp:419
        #23 0x00010c9ff88c in non-virtual thunk to QQuickBehavior::write(QVariant const&) qquickbehavior.cpp
        #24 0x000113f53b7c in QQmlInterceptorMetaObject::doIntercept(QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:392
        #25 0x000113f532e4 in QQmlInterceptorMetaObject::intercept(QMetaObject::Call, int, void**) qqmlvmemetaobject_p.h:153
        #26 0x000113f59788 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:750
        #27 0x0001138474d0 in void QQmlPropertyData::doMetacall<(QMetaObject::Call)2>(QObject*, int, void**) const qqmlpropertydata_p.h:395
        #28 0x000113847128 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:415
        #29 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #30 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #31 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #32 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #33 0x000113c38f84 in QQmlProperty::write(QVariant const&) const qqmlproperty.cpp:1863
        #34 0x000113c39358 in QQmlProperty::write(QObject*, QString const&, QVariant const&) qqmlproperty.cpp:1880
        #35 0x000107c1db04 in QQuickPopupPrivate::hideDimmer() qquickpopup.cpp:1290
        #36 0x000107c16a68 in QQuickPopupPrivate::prepareExitTransition() qquickpopup.cpp:821
        #37 0x000107c1e038 in QQuickPopupTransitionManager::transitionExit() qquickpopup.cpp:1326
        #38 0x000107c23fd4 in QQuickPopup::setVisible(bool) qquickpopup.cpp:2496
        #39 0x000107c104d8 in QQuickPopup::close() qquickpopup.cpp:1408
        #40 0x000107c1ba80 in QQuickPopup::setParentItem(QQuickItem*) qquickpopup.cpp:2180
        #41 0x000107c1b324 in QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp:1063
        #42 0x000107c1bb8c in non-virtual thunk to QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp
        #43 0x00010c117f70 in void QQuickItemPrivate::notifyChangeListeners<void (QQuickItemChangeListener::*)(QQuickItem*), QQuickItem*>(QFlags<QQuickItemPrivate::ChangeType>, void (QQuickItemChangeListener::*&&)(QQuickItem*), QQuickItem*&&) qquickitem_p.h:413
        #44 0x00010c113d7c in QQuickItem::~QQuickItem() qquickitem.cpp:2420
        #45 0x00010c50e3e8 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #46 0x00010c4ed840 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #47 0x00010c4ed86c in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #48 0x00010c4da1c0 in QQuickWindow::~QQuickWindow() qquickwindow.cpp:1197
        #49 0x00010c531f34 in QQuickWindowQmlImpl::~QQuickWindowQmlImpl() qquickwindowmodule.cpp:73
        #50 0x00010cf2d4f4 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:104
        #51 0x00010cf2d3e0 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #52 0x00010cf2d40c in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #53 0x00010472efa8 in QScopedPointerDeleter<QObject>::cleanup(QObject*) qscopedpointer.h:24
        #54 0x00010472eefc in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:81
        #55 0x00010466f0e8 in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:79
        #56 0x00010471246c in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #57 0x00010468ff88 in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #58 0x0001046a953c in tst_QQuickPopup::fadeDimmer() tst_qquickpopup.cpp:2635
        [...]

Amends ef8bde8.

Pick-to: 6.8
Change-Id: Ie5c49b7d9ecd3c74f822590d296062b516563391
Reviewed-by: Volker Hilsheimer <[email protected]>
(cherry picked from commit f8742ca)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
(cherry picked from commit cc726a4)
Inkane and others added 25 commits September 18, 2025 11:35
Change-Id: I84881eca74ebd0876deafedc7498dc3cafdc6474
Reviewed-by: Anton Kudryavtsev <[email protected]>
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
The current documentation for the qmlformat tool uses two separate
tables to list the available command line options and the available
settings file variables.

Some of the content is duplicated between the two tables, as the
settings file variables always have an equivalent command line option to
configure the same behavior.

Despite the duplication, the two tables aren't entirely in sync and
don't necessarily provide the same amount of information.
For example, the command line options table misses some of the default
value for certain configurable behaviors or, similarly, certain
descriptions might be more thorough in one table rather than the other.

Since both tables generally should present the same information for
those features that can be configured both from a command line option
and from a settings file variable, as they present two different but
supposedly equivalent interfaces to the same feature, the tables are now
unified into one, so as to ensure that the description and default value
for the relevant elements can more easily remain in sync, further
reducing the unnecessary duplication between the tables.

In particular, the command line options table was expanded with an
additional column, `Setting Name`, that is set to "N/A" when the
command line option has no equivalent settings file variable and
contains the relevant variable name, taken from the other table, when it
does.

The default values for the relevant element were moved from the
settings file table to the now unified table where necessary.
Since the command line options use flags for boolean variables, where a
behavior is implicitly disabled unless the flag itself is present as
part of the invocation, the meaning of "a default value of false" could
be confusing, possibly suggesting that the user could pass a "false" or
"true" value to the flag to set the behavior.
To avoid this confusion, the "Default Value" column was modified to be a
"Default State/Value" column, and the cell for rows that are affected by
the above issues were modified to be defined as "disabled/false",
hopefully making it more explicit that there is a difference between the
state-based command line usage and the value-based settings file usage.

The description for elements of the above kind was extended to be more
specific about the difference in usage with regards to a command line
invocation and a settings file customization.

The descriptions for the relevant element were brought over from the
settings file table where they either provided additional information or
provided stronger layout for the presented information.

The original settings file table was removed as its information is now
embedded in the unified table.

A "\target qmlformat-settings" command that pointed to the now removed
settings file table was removed as it was unused in the project,
with the consideration that the unified table already provides a
"\target" that can be linked to if necessary.

The title of the section presenting the table was modified to "Options
and settings" to explicit the presence of the new unified information.

A phrase referring to the command line options table as presenting the
available command line options was modified to explicit the presence, in
the now unified table, of both command line options and settings file
variables.

Fixes: QTBUG-139125
Change-Id: Iedcc9ee0a1b3a70417db10736cef4a2955b43750
Reviewed-by: Paul Wicking <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
No security critical issues identified for the qt labs platform.

QUIP: 23
Task-number: QTBUG-136184
Pick-to: 6.10 6.9 6.8
Change-Id: If2d0e6991463ed9994fba8adbc3eef848984ab45
Reviewed-by: MohammadHossein Qanbari <[email protected]>
The parser for QML allows the specification of type hints on a series of
callable elements; such as functions defined as part of a QML type.

It is possible, for example, to provide an hint for the return type of a
function expression, anonymous or not, such as:

```
import QtQml

QtObject {
    property var: function (lhs: int, rhs: int)): int { return lhs + rhs; }
}
```

While this parses correctly, the return type annotation is currently
discarded as part of the parsing process, such that in turn it is
invisible to the engine when managing the function.

Hence, ensure that the return type annotation for function expressions
is preserved during the parsing process so that it can later be visible
to the engine.

In particular, the AST node that represents this kind of element can
already store a type annotation that refers to its return type and later
down the line, the code generation phase is already able to take into
account the annotation when it builds its representation of the function.

Nonetheless, that storage is currently purposefully not used in the
cases we are interested into, albeit it is in other cases that might be
considered more common.
This is most probably, albeit nowhere near certainly, due to simple
historical reasons and partial implementations related to type hints.

Thus, ensure that the return type annotation is correctly preserved and
stored for `FunctionExpression` rules during the parsing process, such
that it can later be recognized and used by the engine.

A few test cases related to the return type annotation were added.

Pick-to: 6.10
Task-number: QTBUG-137944
Change-Id: I6133bb286a916d0687ff5d5542b9aa769cfd493b
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
Component.onCompleted: {
    if(true) /* true */ {
        // the true clause
    } else {
        // the else clause
    }
}

was formatted to :

Component.onCompleted: {
   if (true /* true */)
   // the true clause
   {} else
   // the else clause
   {}
}

Add a new parameter to outWithComments that allows to change the
indentation. The use cases are:
```
{
    // 1) some comment attached to '{'
    ...
    // 2) some comment attached to '}'
}
```
For 1), IncreaseIndentation prints '{' and then increase the
indentation before printing any post comment.

For 2), DecreaseIndentation prints the pre comments, decrease the
indentation and then proceed with '}' and potential post comments.

This allows to print the comments attached to `{}` tokens with the
correct indentation.

Also adapt a test to the new comment behavior on blocks.

Pick-to: 6.10
Task-number: QTCREATORBUG-33333
Task-number: QTBUG-123386
Change-Id: If8dd483a520c3bd25e161f3cec05530c1460bb80
Initial-patch-by: Xavier BESSON <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
Avoid using split().size() and a QString and directly use count(). Avoid
unnecessary copies of bPath on the stack by using a reference, and only
stringappend "_deps" to the current build folder once. Also use
QDirListing instead of creating a QDir to avoid creating an extra
temporary list.

Change-Id: Ie3bb05d8c70a0aa8380001ea76f77faa114aba18
Reviewed-by: Fabian Kosmale <[email protected]>
Fixes build error from testing for an unknown feature flag, i.e.

tst_qmltyperegistrar.cpp:1439:6: error: division by zero in preprocessor
expression

As it's a private feature, include a private header.

Pick-to: 6.10
Change-Id: I6112d73ebb738a555c05211d8f6c29a053de7b39
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Mårten Nordheim <[email protected]>
Fix linking issues in qqmlsortfilterproxymodel.cpp:

qqmlsortfilterproxymodel.cpp:86: (qdoc) warning: Can't link to
        'SortFilterProxyModel::setPrimarySorter(sorter)'
qqmlsortfilterproxymodel.cpp:343: (qdoc) warning: Can't link to
        'recursiveFilteringEnabled'

Add an \internal class topic for private class QQmlSortFilterProxyModel.
This removes warnings such as:

qqmlsortfilterproxymodel.cpp:287: (qdoc) warning: No output generated
        for 'QQmlSortFilterProxyModel::~QQmlSortFilterProxyModel()'
        because 'QQmlSortFilterProxyModel' is undocumented

Pick-to: 6.10
Change-Id: I6ea3a6be606a5fdff18750beab28cdb16dba9755
Reviewed-by: Mate Barany <[email protected]>
The TestResult type has never been documented, but the source code
contains QDoc documentation comments for a number of its properties.

Add a \qmltype topic for the type and mark it \internal, to remove
QDoc warnings such as

quicktestresult.cpp:184: (qdoc) warning: No output generated for QML
        property 'TestResult::testCaseName' because 'TestResult' is
        undocumented

Change-Id: I4021c482f145e591c2c8434ff016d547fc465ad9
Reviewed-by: Andreas Eliasson <[email protected]>
Reviewed-by: Mitch Curtis <[email protected]>
Mark all files as significant.

Use reason:trusted-sources on files that spawn QProcess or parse data:
* qdochtmlparser.cpp parses content obtained from the QHelpEngine,
  which is a trusted source
* qqmlcodemodel is used to spawn QProcesses that runs CMake (which is
  a trusted source) with arguments from
  QQmlLSUtils::cmakeBuildCommand(const QString &path) (which is also a
  trusted source) or trusted hard-coded arguments.

Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-136201
Change-Id: I3f2ff1dfc208224baff6fe88b337fe24c44b599a
Reviewed-by: Ulf Hermann <[email protected]>
Mark all files as significant.

Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-136187
Change-Id: I655241e8fd460f423c230b3ae2979246f4ffc841
Reviewed-by: Ulf Hermann <[email protected]>
Don't search C++ headers on fallback code model: the url is empty so it
seems we end up searching the current working directory(?) of qmlls for
C++ headers. This might have caused some flakyness in
tst_qmlls_qqmlcodemodel where some unrelated tests timeout because of
this useless search.

Change-Id: I0a5c9071cdd5a2f06f5ef8b392b2091b357e4887
Reviewed-by: Ulf Hermann <[email protected]>
In order to determine whether an ID is visible from a referrer we need
not only determine the component boundaries of the referrer, but also
those of the candidate elements with the respective ID. Rewrite the
logic to have QQmlJSScopesById handle this. It has to iterate the
respective elements anyway and can therefore easily check if one of them
is assigned to an unknown property. It now provides low-level methods
that output all possible candidates for an ID, while also stating the
confidence associated with them. The plain id() and scope() methods only
return results we are actually certain about.

In places where we generate warnings or can allow for some fuzzy
results, we use the low-level methods, since those generally produce
more informative results.

The QML DOM was passing the JavaScript global object as referrer to the
scope() method before. This happened to work but was, of course, wrong.
Make sure that ID elements in the DOM receive a proper QML scope to
avoid that.

Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-140041
Change-Id: I41cf8603ae6a5d5461d3c12d74521e68b5e28ea4
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
QUIP: 23
Task-number: QTBUG-136184
Pick-to: 6.10 6.8
Change-Id: I1667422991e98c7f3c0c72654dc7b4df2c23361b
Reviewed-by: Oliver Eftevaag <[email protected]>
when building without exceptions, yoga will std::terminate, but it fails
to include the required header.

Pick-to: 6.10 6.10.0
Change-Id: Ia808898d07d08b9d81184696068bbda65ba330d2
Reviewed-by: Santhosh Kumar <[email protected]>
Change-Id: I8e98b349b18e18d6b0ced0446c2478ea8d37c5bc
Reviewed-by: Qt Submodule Update Bot <[email protected]>
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I6dfa9c0abf4bef736c39caee578b630efdea748d
Reviewed-by: Timur Pocheptsov <[email protected]>
startSystemMove() and startSystemResize() are callable from QML but
were undocumented.
This change adds \qmlmethod documentation under the Window type.

Pick-to: 6.8 6.9 6.10
Fixes: QTBUG-126558
Change-Id: Ib34a25fa3f9e12cc6fab85732c852a81448dcc4b
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Safiyyah Moosa <[email protected]>
after calling grabToImage in the callback it returns a qml wrapper
around QQuickItemGrabResult object but then in the Event_Grab_Completed
event it destroys the QQuickItemGrabResult object so the wrapper is
also automatically destroyed after that.
so in order for qml to be able to store the wrapper object and hold the
result as long as needed we give the ownership of QQuickItemGrabResult
to qml instead of deleting it.

Pick-to: 6.10 6.8
Fixes: QTBUG-128483
Change-Id: Ibf9b9765e22ee8e0caf8b3646d86f8a4cf789ff1
Reviewed-by: Ulf Hermann <[email protected]>
The first qml file in tests/auto/qmltest/textedit seems to determine the
import version: switch to versionless imports on all of them so that
we can use new properties in the new test.

In the autotest, reset the url to planets.txt before each test case,
now that we are loading a different file to test duplication of
multiple blocks.

This reverts commit 295953b.

[ChangeLog][QtQuick][TextEdit] In addition to TextEdit.cursorSelection,
you can now create non-visual instances of TextSelection and use them to
modify rich text programmatically.

Change-Id: Ia121def3e033054c7cb117e53af877e2596d4e3a
Reviewed-by: Oliver Eftevaag <[email protected]>
Similar to 9c5fc88

Change-Id: I2f097a6327580a693a8b221bca523916208a72bc
Reviewed-by: Shawn Rutledge <[email protected]>
QUIP: 23
Task-number: QTBUG-136184
Pick-to: 6.10
Change-Id: I27e9fc93ca4503459263aa4086d89c79fc1bebfa
Reviewed-by: Ulf Hermann <[email protected]>
* use unique_ptr for memory management
* declare static member as inline to avoid slim down the builds a bit

Pick-to: 6.10
Change-Id: I3406fb2e5f027303451b0e08de6a565195f23a55
Reviewed-by: Fabian Kosmale <[email protected]>
Don't let the initialization of a non-optional, supposedly dynamic,
plugin pass if there actually is no QPluginLoader for it. The absence of
the QPluginLoader in this case tells us that the plugin is in fact
static and we need to check the static plugin map.

Optional static plugins are not an issue here since there is no code
path to create instances of those. They need to be linked into the
application and thereby have their module registration function hooked
up in order to be reachable at all.

Pick-to: 6.10
Task-number: QTBUG-140220
Change-Id: I82e44fba2f2880ada16a5ea60e2e33f1900b208e
Reviewed-by: Ulf Hermann <[email protected]>
Use QMetaType create() and destroy(), instead of operator new() +
construct() and destruct() + operator delete(). The QMetaType functions
do the same work, but with the correct alignment.

For write(), align the alloca buffer by oversizing and std::align.

Remove the if(gadgetPtr()) since QMetaType::destroy() accepts nullptr.

Amends 30a95fa.

Change-Id: Ia28882cef864e0199465ad791cd40328d14a8add
Reviewed-by: Ulf Hermann <[email protected]>
iCristalrope and others added 30 commits October 22, 2025 22:12
The two computations may result in the same string.

Insert the second one only if it is differnt.

Amends c4455f1

Pick-to: 6.10
Change-Id: I0c4df0cf6bb5bba2c1cf6c50b8a7f105718b85ee
Reviewed-by: Sami Shalayel <[email protected]>
This is apparently better than using globalObject.

registerModule was introduced in
3464655.

Pick-to: 6.8 6.10
Change-Id: Ic664e65d7e5f8d65004112802e8f19f4f790bb7d
Reviewed-by: Ulf Hermann <[email protected]>
So when we touch-press the right HoverHandler, the left stays hovered
sometimes.  Hmm.  Let's check the right one first, and see if that's
also flaky.

Subsequent hover patches may affect behavior here: that's what we are
checking for.

Task-number: QTBUG-141430
Change-Id: I10709cc454f25be91159c520a385603de7067acf
Reviewed-by: Shawn Rutledge <[email protected]>
Fixes: QTBUG-141198
Pick-to: 6.10
Change-Id: I1235d021416d43c00cc856f10e826369a34c826c
Reviewed-by: Safiyyah Moosa <[email protected]>
Add API for specifying individual corner radius values similar to Quick
Rectangle. Try to keep the overhead minimum when not used, by storing
data in lazily allocated extra and using separate shader.

Use the API in the neumorphicpanel example.

Task-number: QTBUG-141110
Change-Id: I90e558526dff01c88fb2d163a33704b8f73aa1fc
Reviewed-by: Richard Moe Gustavsen <[email protected]>
… ready"

This reverts commit 2127cbb.

Reason for revert: The timeout bug has a fix now.

Task-number: QTBUG-139591
Change-Id: I90d8c797c7e327bfb92baea3000157048ca3d685
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Mitch Curtis <[email protected]>
Change-Id: I17312a39bc4fbd6a6de3f177cb8667666799bf76
Reviewed-by: Qt Submodule Update Bot <[email protected]>
Some fields under QtView and thus under QtQuickView are marked
as protected which ends up shown in javadoc. These fiedls are
internal and shouldn't be treated as public, so instead, make
them private and provide package-private getters/setters for
QtQuickView to access those fields internally.

Task-number: QTBUG-141365
Change-Id: Ibefd262412a07b323ff9c40bcf57f5da21b53975
Reviewed-by: Jani Heikkinen <[email protected]>
tst_QQuickContextMenu::menuItemShouldntTriggerOnRelease() has always
been flaky (introduced in dac8529).

Skip it to unblock submodule update.

Task-number: QTBUG-133302
Task-number: QTBUG-137400
Task-number: QTBUG-141398
Task-number: QTBUG-141406
Pick-to: 6.10 6.9
Change-Id: I3bc1e02d7e5ac81296d85b6b40a602f820a25118
Reviewed-by: Shawn Rutledge <[email protected]>
The intention was always to run it with every single built-in style.
Previously the Imagine style was omitted because of an issue that needed
more investigation. It seems like that has since been resolved, and that
it's safe to include it in the list of styles to run
tst_qquickfiledialogimpl with.

Change-Id: I7634a938c550392f8f5c18c141404c80a7ab99b2
Reviewed-by: Mitch Curtis <[email protected]>
This makes it more convenient to test changes to dialogs for both popup
types.

Only Popup.Item and Popup.Window are relevant for dialogs at the moment.

Change-Id: I766030dee06d342c115941e83acb74afedc82921
Reviewed-by: Mitch Curtis <[email protected]>
Amends 6eaa956

Pick-to: 6.5 6.8 6.10
Change-Id: I195e26fa1a703607b1d65d57e5dc43a072b05e72
Reviewed-by: Mitch Curtis <[email protected]>
Change-Id: Ifd85cfa7567aee1e13369b1d16ac0da7bd69a860
Reviewed-by: Oliver Eftevaag <[email protected]>
As it stood, the progress bar groove would not be resized
according to the size of the control, since it lacked at
width binding.

This patch will make sure to resize the groove correctly. It
also fixes a binding loop warning related to the use of Loaders
in combination with childrenRect in the same go.

Fixes: QTBUG-141182
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I1aa87db339b04686ca521b486e4c7a05683a7679
Reviewed-by: Tor Arne Vestbø <[email protected]>
With Liquid Glass enabled, the groove of the Slider and
RangeSlider had a border which made the groove look taller
than the track/progress (which had no border). But looking
more carefully at the native NSSlider in Xcode, it shows
that the Slider groove (and track) should no longer have
any border at all (which is different from how it looks
in macOS 15).

This patch will therefore draw the track without a border when
running with Liquid Glass. Using nested rectangles in order to
draw the slider in the macOS 15 style was also unnecessary, as
we can achive the same look by using a single Rectangle.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I9d03a212f39857a448d103372636e9a12a7cbd3f
Reviewed-by: Tor Arne Vestbø <[email protected]>
Support relative import paths in qmlls.build.ini and .qmlls.ini files.
Add a helper function in QQmlToolingSettings that takes care of
resolving paths, and use it in qmlls. A later commit will also use it
when loading .qmllint.ini files.

Fixes: QTBUG-141219
Pick-to: 6.10
Change-Id: Idc22ac07f7aa9910f7e5a6ca51115a457a909fa6
Reviewed-by: Fabian Kosmale <[email protected]>
Use the same logic as qmlls to load import paths in qmllint:
QVariant::toStringList() always returns a QStringList() of length one.
Instead, use the QDir::listSeparator() char to split the list into
multiple one, allowing the users to pass multiple paths via settings
files. Somehow the setting file entries to pass paths to qmllint are not
documented, so no need to update the documentation it seems.

Pick-to: 6.10
Task-number: QTBUG-141385
Change-Id: Iaf34c09601bfb423ceb658e9a87a961b5d8c1c90
Reviewed-by: Fabian Kosmale <[email protected]>
…t value

When setting an implicit description (from placeHolderText) it would
unconditionally overwrite any explicitly set Accessible.description
(even if the placeHolderText was empty), causing Accessible.description
to be empty even if it was previously explicitly set to a non-empty
value.

Change-Id: Ice3f81dba1a4c188be71856860e7d6b3a0cf9f95
Reviewed-by: Jan Arve Sæther <[email protected]>
Change-Id: I50c33394f90a72b9b78f60e4e0ed3071ee1f13c0
Reviewed-by: Hatem ElKharashy <[email protected]>
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
The shortcut override has been made to be ignored by default as part of
the patch 1aefea2. And the further
changes in the same patch were made to check whether the shortcut
override can be accepted by text edit before processing the events.

If the shortcut override has not been accepted (either by default or
explicitly ignored by the user), the keys would be processed further by
the textedit. The validation added as part of the same patch for
processing the event doesn't seem to be correct, as it allows the key to
be processed by the text edit control only when the key handler is not
configured. This approach seems to be incorrect, as the text edit
control shall be allowed to process the key events regardless of key
handler configuration.

This patch removes that validation, thus allowing the text edit control
to process the key events regardless of key handler configuration.

Fixes: QTBUG-139679
Task-number: QTBUG-136959
Pick-to: 6.10 6.8 6.5
Change-Id: I7c066e5f3709a00d0b18f0c5e8b9d1f7944c4e4e
Reviewed-by: Shawn Rutledge <[email protected]>
Using JS placeholders inside qsTr() is a bad practice, and makes
translations impossible

Change-Id: I08dffd1a718a7112a8e426a013419578ec2f16f0
Reviewed-by: Shawn Rutledge <[email protected]>
It was possible that we would request to flush more of the backing store
than what was actually painted, which could lead to artifacts. Now when
there is a difference caused by the pixel alighment conversions, we make
sure to mark items behind that content as dirty so that everything
necessary to render correctly is painted.

Fixes: QTBUG-133368
Pick-to: 6.10 6.8
Change-Id: I9766017eb610792ffa17b745c356b614e4e28752
Reviewed-by: Christian Strømme <[email protected]>
Task-number: QTBUG-139676
Change-Id: Iea39ae7c18e71956e7a101a86425c84d876e8730
Reviewed-by: Michael Weghorn <[email protected]>
The object is stored in a QPointer for a reason. If it's already gone,
we don't have to destroy it anymore. Check accordingly.

Pick-to: 6.10 6.8 6.5
Fixes: QTBUG-141105
Change-Id: I36278cac5990e5063b9021104267d83578678559
Reviewed-by: Fabian Kosmale <[email protected]>
If necessary, create the inner QQmlListModel eagerly. It would otherwise
be created lazily when retrieving the function.

Pick-to: 6.10 6.8 6.5
Fixes: QTBUG-140900
Change-Id: Icf26570e7bd214c04855de1dfc22b2a6a1dae709
Reviewed-by: Sami Shalayel <[email protected]>
We don't need the .qmlls.ini generation anymore in 6.10. Don't hint the
user about it in qmlls.

Pick-to: 6.10
Task-number: QTBUG-141225
Change-Id: Ie31e486a9b517cd442feb6dec3ec47f144d5e7ac
Reviewed-by: Fabian Kosmale <[email protected]>
It shouldn't be needed anymore in Qt 6.10, so remove all links and hints
to it across the documentation. The QT_QML_GENERATE_QMLLS_INI variable
still does stuff in 6.10, so keep the QT_QML_GENERATE_QMLLS_INI
documentation still around.

Fixes: QTBUG-141225
Pick-to: 6.10
Change-Id: I0312dc8beaa2417ad2621a0da5feb8a27a280865
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Leena Miettinen <[email protected]>
Change-Id: I6b725f860585b55b345c543613caf49803f3fc7e
Reviewed-by: Qt Submodule Update Bot <[email protected]>
Add internal documentation for Qt Bridges projects.
Describe what our CMake scripts generate, so that other projects can
also generate QML Modules that qmllint and qmlls can use. Also describe
on how to invoke qmltyperegistrar, qmllint and qmlls, and what is the
JSON output of MOC that qmltyperegistrar requires.

Fixes: QTBUG-141119
Change-Id: Ifbc8f72b7e313ce319104b3bc119a7ec26a43c97
Reviewed-by: Fabian Kosmale <[email protected]>
Making links explicit prevents QDoc from auto-linking when not desired.
Marking QtQuick as code when relevant also prevents auto-linking.

Change-Id: Ib187cb94f59a418c77ef2931999f634e557c8200
Reviewed-by: Mitch Curtis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.